import { getPrescriptionPicService } from '@/api/consult'
import { ImagePreview, Toast } from 'vant'

export const useShowPrescription = () => {
  // 查看原始处方
  const showPrescription = async (id: string) => {
    try {
      const res = await getPrescriptionPicService(id)
      ImagePreview([res.url])
    } catch (error) {
      console.log(error)
      Toast('查看处方失败')
    }
  }
  return {
    showPrescription,
  }
}
